#include<stdio.h>
#include<stdlib.h>
	int main(void)
	{  
        int x;
        scanf("%d", &x);
        x = abs(x);
        int a, b, c;
        a = x / 100;
        b = x % 100 / 10;
        c = x % 10;
        printf("%d", c * 100 + b * 10 + a);
        return 0;
	}
